<template>
  <div>
    <el-dialog
      :close-on-click-modal="false"
      :close-on-press-escape="false"
      :title="title"
      :visible="open"
      width="500px"
      append-to-body
      @close="cancel()"
    >
      <el-form ref="form" :model="item" label-width="80px">
        <h3 style="text-align: center; font-weight: 600">{{ item.title }}</h3>

        <div v-html="item.content"></div>
        <div style="height:30px;"></div>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="cancel">关 闭</el-button>
        <el-button @click="confirm" v-if="item.msgType==7" type="primary">去填写</el-button>
      </div>
    </el-dialog>
  </div>
</template>

  <script>
export default {
  props: {
    open: Boolean,
    title: { type: String },
    item: { type: Object, default: {} },
  },
  data() {
    return {};
  },
  watch: {},
  mounted() {},
  methods: {
    cancel() {
      this.$emit("update:open", false);
    },
    confirm(){
      this.$router.push({
          path: "/question",
          query: {
            id: this.item.keyId,
            serveyUserId: this.item.serveyUserId,
          },
        });
    }
  },
};
</script>
<style scoped lang="scss">
</style>
